# -*- coding: utf-8 -*-
"""
Created on Thu Oct 03 12:59:48 2013

@author: jkwong
"""
# PBAR_ConvertManySCANtoNPY.py
import os
import numpy as np

scanNumbers = np.array((4808,4822,4835,4839,4852,4853,4866,4871,4872,4887,4888,4904,4906,4907,4923,4924, \
    4937,4938,4939,4940,4941,4942,4954,4955,4971,4972,4974,4975,4996,4997,5012,5014, \
    5015,5035,5036,5050,5051,5074,5087,5088,5089,5106,5107,5108,5135,5144,5157,5161, \
    5163,5164,5182,5183,5199,5206,5221,5222,5240,5241,5254,5255,5269,5270,5283,5284, \
    5299,5300))

for s in scanNumbers:
    cmmd = 'python PBAR_BasicZSPEC_SCNtoCSV.py /home/dastest/program/imaging ~/vxWorks/jkwong %d' %s
    print(cmmd)
    os.system(cmmd)
    # Delete files
    cmmd = 'rm %d/*.csv' %s
    print(cmmd)
    os.system(cmmd)
    cmmd = 'rm %d/*.img' %s
    print(cmmd)
    os.system(cmmd)
